<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     pagizer
 * @subpackage  website
 */

/**
 * Generic frontend rss feed block
 *
 * Block parameters :
 * - url (string)
 * - displayFeedTitle (boolean)
 * - displayFeedDescription (boolean)
 * - itemsNumber (integer)
 * - displayFeedItemsDescription (boolean)
 */
class m_website_actions_block_front_RssFeedAction extends f_core_Action
{
	public function execute()
	{
        if(is_null($this->getBlockParameter('url')))
        {
            return '';
        }

        $rss = f_rss_Parser::getInstance($this->getBlockParameter('url'));

        $this->addToModel('blockParams', $this->getBlockContext()->getParameters());
        $this->addToModel('rss', $rss);
        $this->setView('success');
	}

    
}